package com.itheima.stock.mapper;

import com.itheima.stock.pojo.domain.*;
import com.itheima.stock.pojo.entity.StockRtInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author Administrator
* @description 针对表【stock_rt_info(个股详情信息表)】的数据库操作Mapper
* @createDate 2024-07-21 11:07:01
* @Entity com.itheima.stock.pojo.entity.StockRtInfo
*/
@SuppressWarnings("MybatisXMapperMethodInspection")
public interface StockRtInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockRtInfo record);

    int insertSelective(StockRtInfo record);

    StockRtInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockRtInfo record);

    int updateByPrimaryKey(StockRtInfo record);

    List<StockUpdownDomain> getNewestStockInfo(Date curDate);

    List<StockUpdownDomain> getStockInfoByRank(Date curDate);

    List<Map> getStockUpdownCount(@Param("openTime") Date openTime, @Param("curTime") Date curTime, @Param("flag") int flag);

    List<Map> getStockUpDown(Date curDate);

    List<Stock4MinuteDomain> stockScreenTimeSharing(@Param("code") String code, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<Stock4EvrDayDomain> getStockInfo4EvrDay(@Param("code") String code, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    /**
     * 批量插入功能
     * @param stockRtInfoList
     */
    int insertBatch(@Param("list") List<StockRtInfo> stockRtInfoList);

    List<stockLixangXiang> getStockLixangXiang(@Param("searchStr") String searchStr);

    stockDescribe getStockDescribe(@Param("code") String code);

    Stock4NewRtDomain getStock4NewRtDomain(@Param("code") String code, @Param("curDate")Date curDate);

    List<Stock4RtNewWater> getStock4RtNewWater(@Param("code") String code);

    List<Map> getStockUpDownCount(@Param("start") Date start, @Param("end") Date end, @Param("flag") int flag);
}
